package proxy.staticproxy;

import proxy.api.ITrainStation;
import proxy.target.TrainStation;

public class TrainStationProxy implements ITrainStation {
    TrainStation trainStation;

    public TrainStationProxy(TrainStation trainStation) {
        this.trainStation = trainStation;
    }

    @Override
    public void sell() {
        before();
        trainStation.sell();
        after();
    }

    private void before() {
        System.out.println("欢迎光临，请坐，请喝茶!(static)");
    }

    private void after() {
        System.out.println("多谢惠顾！(static)");
    }
}
